package yscmd

import "context"

type App struct {
	rootCmdBuilder ICommandBuilder
}

func (a App) Run(ctx context.Context) {
	a.rootCmdBuilder.Init(ctx)
	a.rootCmdBuilder.Command().Exec(ctx)
}

func NewApp(root ICommandBuilder) App {
	return App{rootCmdBuilder: root}
}
